package racer.client.gui.tiles;

import racer.client.gui.*;

/**
 *
 * @author Lieven
 */
public class Tile {
  public int id;   
  //x en y zijn coordinaten van linkerbovenhoek van afbeelding
  public int x;
  public int y;
  public int width;      
  public int height;     
  public String type;
  public TileTypeNeighbours ttn;
      
    
public Tile(int id,String type) {
     this.id=id;
     this.type=type;
}

 /**
 *Tile Object: each tile has 2 coordinates (x,y = left top corner of tile),width,height,tile type and neighbourobject (see TileTypeNeighbours)
 *<br>
 * @param  id tile id.
 * @param x coordinate of top left corner of tile
 * @param y coordinate of top left corner of tile
 *@param w width of tile
 * @param h height of tile
  *@param type tile-type (so we know what image to paint)
 *@param ttn TileTypeNeighbours-object
 * @see TileTypeNeighbours#TileTypeNeighbours(String type,int left,int right,int top,int bottom)

 */          
public Tile(int id,int x,int y,int w,int h,String type,TileTypeNeighbours ttn) {
     this.id=id;
     this.x=x;
     this.y=y;
     this.width=w;
     this.height=h;
     this.type=type;
     this.ttn=ttn;
}

public void setXY(int x,int y){
     this.x=x;
     this.y=y;
}

public int getID(){
      return id;
  }

public void setID(int id){
      this.id=id;
}

public void setTileTypeNeighbours(TileTypeNeighbours ttn){
      this.ttn=ttn;
}
     
public TileTypeNeighbours getTileTypeNeighbours(){
      return ttn;
}    
    
}
